# -*- coding:utf-8 -*-


def move(n, x, y, z, count):
    if n == 1:
        print(f"{x} --> {z}")
        count += 1
        return count
    else:
        count = move(n - 1, x, z, y, count)
        count = move(1, x, y, z, count)
        count = move(n - 1, y, x, z, count)
        return count


if __name__ == "__main__":
    print(move(3, "A", "B", "C", 0))
